feat(stovepipe): wire gateway Ingest to the request log#270
Open
behinddwalls wants to merge 1 commit into
Open
feat(stovepipe): wire gateway Ingest to the request log#270behinddwalls wants to merge 1 commit into
behinddwalls wants to merge 1 commit into
Conversation
## Summary ### Why? The Stovepipe gateway minted a SPID and published to the queue but persisted nothing, so a freshly ingested commit had no observable record until the orchestrator processed it. SubmitQueue's gateway records an `accepted` status synchronously on entry and owns the request log end to end; this brings the Stovepipe gateway to the same shape now that the entity stores exist. ### What? Wires the gateway to the gateway-owned `RequestLogStore` (persist + consume); identity stays the synthetic SPID and there is no new read RPC or proto change. - `Ingest` now records an `accepted` `RequestLog` synchronously (written straight to storage, before publishing to the start topic) so the status is visible the moment the RPC returns. A log-write failure aborts before anything is published. - Adds a gateway `log`-topic consumer (`stovepipe/gateway/controller/log`) that persists `RequestLog` entries — the gateway is the sole writer of the request log; the orchestrator only publishes log events for it to persist. - Adds the `log` topic key to `stovepipe/core/topickey`. - Rewires the example gateway server: opens the app DB (storage + SPID counter) and the queue, builds a registry that publishes `start` and consumes `log`, registers `Ingest` behind an InvalidArgument interceptor, and runs the log consumer with graceful shutdown. - Adds `local-init-stovepipe-schemas` (storage + counter to mysql-app, queue to mysql-queue) and points the gateway / full-stack local start targets at it. The `IngestController` and the log consumer both depend on the narrow `RequestLogStore` interface rather than the full `Storage` facade, since that is all either needs. ## Test Plan - `bazel test //stovepipe/...` — all targets pass (new gateway log consumer + updated ingest tests) - `bazel build //stovepipe/... //example/stovepipe/...` - `make fmt`, `make lint-license`, `make gazelle` — clean / idempotent
d43bb75 to
d472633
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Why?
The Stovepipe gateway minted a SPID and published to the queue but persisted nothing, so a freshly ingested commit had no observable record until the orchestrator processed it. SubmitQueue's gateway records an
acceptedstatus synchronously on entry and owns the request log end to end; this brings the Stovepipe gateway to the same shape now that the entity stores exist.What?
Wires the gateway to the gateway-owned
RequestLogStore(persist + consume); identity stays the synthetic SPID and there is no new read RPC or proto change.Ingestnow records anacceptedRequestLogsynchronously (written straight to storage, before publishing to the start topic) so the status is visible the moment the RPC returns. A log-write failure aborts before anything is published.log-topic consumer (stovepipe/gateway/controller/log) that persistsRequestLogentries — the gateway is the sole writer of the request log; the orchestrator only publishes log events for it to persist.logtopic key tostovepipe/core/topickey.startand consumeslog, registersIngestbehind an InvalidArgument interceptor, and runs the log consumer with graceful shutdown.local-init-stovepipe-schemas(storage + counter to mysql-app, queue to mysql-queue) and points the gateway / full-stack local start targets at it.The
IngestControllerand the log consumer both depend on the narrowRequestLogStoreinterface rather than the fullStoragefacade, since that is all either needs.Test Plan
bazel test //stovepipe/...— all targets pass (new gateway log consumer + updated ingest tests)bazel build //stovepipe/... //example/stovepipe/...make fmt,make lint-license,make gazelle— clean / idempotentStack